package com.bestcem.xm.deliver.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 之前python运营商短信类型（现已废弃，只是为了适配之前接口请求）
 *
 * @author YiFang <yifang.zhang@idiaoyan.com>
 * @version v1.0
 * @date 2022/1/14 11:00
 */
@Getter
@AllArgsConstructor
public enum OldSmsChannelTypeEnum {
    /**
     * DH3T通知
     */
    RECORD_TTYPE_NOTIFY(0,"DH3T通知"),
    /**
     * DH3T营销
     */
    RECORD_TTYPE_MARKET(1,"DH3T营销"),
    /**
     * 亿美通知
     */
    RECORD_TTYPE_MTN_NOTIFY(2,"亿美通知"),
    /**
     * 亿美营销
     */
    RECORD_TTYPE_MTN_MARKET(3,"亿美营销"),
    /**
     * 科大讯飞通知
     */
    RECORD_TTYPE_KDXF_NOTIFY(4,"科大讯飞通知"),
    /**
     * 科大讯飞营销
     */
    RECORD_TTYPE_KDXF_MARKET(5,"科大讯飞营销");
    private int code;

    private String type;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    /**
     * 检查是否是营销通知类型
     */
    public static boolean checkSmsMarketType(Integer type){
        if (type == null) {
            return false;
        }
        return type == RECORD_TTYPE_MARKET.getCode() || type == RECORD_TTYPE_MTN_MARKET.getCode() || type == RECORD_TTYPE_KDXF_MARKET.getCode();
    }
}
